package com.example.common.model;

import java.lang.reflect.Field;
import java.util.Date;
import cn.hutool.core.date.DatePattern;
import com.baomidou.mybatisplus.annotation.IdType;
import com.example.common.base.BaseBean;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 用户信息表(user)
 *
 * @author 510
 * @version 1.0.0 2021-04-23
 */
@ApiModel(description = "用户信息表")
@TableName("user")
public class User extends BaseBean {

//    {
//        Class<?> aClass = this.getClass();
//        Field[] fields = aClass.getDeclaredFields();
//        try {
//            for (Field field : fields) {
//                field.setAccessible(true);
//                if (field.getType() == String.class) {
//                    field.set(this, "null");
//                }
//                if (field.getType() == Integer.class) {
//                    field.set(this, 1);
//                }
//                if (field.getType() == Date.class) {
//                    field.set(this, new Date());
//                }
//            }
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
    /** 版本号 */
    private static final long serialVersionUID = 479553915074007895L;

    /* This code was generated by TableGo tools, mark 1 begin. */

    @ApiModelProperty(value = "")
    @TableId(type= IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "用户id")
    private String userId;

    @ApiModelProperty(value = "用户名称")
    private String userName;

    @ApiModelProperty(value = "密码，可选，可有可无")
    private String passWord;

    @ApiModelProperty(value = "最后活动时间，以后的扩展功能，暂时不考虑")
    @JsonFormat(timezone = "GMT+8", pattern = DatePattern.NORM_DATETIME_PATTERN)
    private Date lastActivated;

    @ApiModelProperty(value = "用户头像地址")
    private String userAvatarUrl;

    @ApiModelProperty(value = "表明用户是哪种身份，比如学校官方，来区别普通用户")
    private String userType;

    @ApiModelProperty(value = "")
    private String createdBy;

    @ApiModelProperty(value = "")
    @JsonFormat(timezone = "GMT+8", pattern = DatePattern.NORM_DATETIME_PATTERN)
    private Date creationDate;

    @ApiModelProperty(value = "")
    private String lastUpdatedBy;

    @ApiModelProperty(value = "")
    @JsonFormat(timezone = "GMT+8", pattern = DatePattern.NORM_DATETIME_PATTERN)
    private Date lastUpdateDate;

    @ApiModelProperty(value = "删除标记 1是未删除 0是已删除")
    private Integer deleteFlag;

    /* This code was generated by TableGo tools, mark 1 end. */

    /* This code was generated by TableGo tools, mark 2 begin. */

    /**
     * 获取id
     *
     * @return id
     */
    public Integer getId() {
        return this.id;
    }

    /**
     * 设置id
     *
     * @param id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取用户id
     *
     * @return 用户id
     */
    public String getUserId() {
        return this.userId;
    }

    /**
     * 设置用户id
     *
     * @param userId
     *          用户id
     */
    public void setUserId(String userId) {
        this.userId = userId;
    }

    /**
     * 获取用户名称
     *
     * @return 用户名称
     */
    public String getUserName() {
        return this.userName;
    }

    /**
     * 设置用户名称
     *
     * @param userName
     *          用户名称
     */
    public void setUserName(String userName) {
        this.userName = userName;
    }

    /**
     * 获取密码，可选，可有可无
     *
     * @return 密码
     */
    public String getPassWord() {
        return this.passWord;
    }

    /**
     * 设置密码，可选，可有可无
     *
     * @param passWord
     *          密码
     */
    public void setPassWord(String passWord) {
        this.passWord = passWord;
    }

    /**
     * 获取最后活动时间，以后的扩展功能，暂时不考虑
     *
     * @return 最后活动时间
     */
    public Date getLastActivated() {
        return this.lastActivated;
    }

    /**
     * 设置最后活动时间，以后的扩展功能，暂时不考虑
     *
     * @param lastActivated
     *          最后活动时间
     */
    public void setLastActivated(Date lastActivated) {
        this.lastActivated = lastActivated;
    }

    /**
     * 获取用户头像地址
     *
     * @return 用户头像地址
     */
    public String getUserAvatarUrl() {
        return this.userAvatarUrl;
    }

    /**
     * 设置用户头像地址
     *
     * @param userAvatarUrl
     *          用户头像地址
     */
    public void setUserAvatarUrl(String userAvatarUrl) {
        this.userAvatarUrl = userAvatarUrl;
    }

    /**
     * 获取表明用户是哪种身份，比如学校官方，来区别普通用户
     *
     * @return 表明用户是哪种身份
     */
    public String getUserType() {
        return this.userType;
    }

    /**
     * 设置表明用户是哪种身份，比如学校官方，来区别普通用户
     *
     * @param userType
     *          表明用户是哪种身份
     */
    public void setUserType(String userType) {
        this.userType = userType;
    }

    /**
     * 获取createdBy
     *
     * @return createdBy
     */
    public String getCreatedBy() {
        return this.createdBy;
    }

    /**
     * 设置createdBy
     *
     * @param createdBy
     */
    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    /**
     * 获取creationDate
     *
     * @return creationDate
     */
    public Date getCreationDate() {
        return this.creationDate;
    }

    /**
     * 设置creationDate
     *
     * @param creationDate
     */
    public void setCreationDate(Date creationDate) {
        this.creationDate = creationDate;
    }

    /**
     * 获取lastUpdatedBy
     *
     * @return lastUpdatedBy
     */
    public String getLastUpdatedBy() {
        return this.lastUpdatedBy;
    }

    /**
     * 设置lastUpdatedBy
     *
     * @param lastUpdatedBy
     */
    public void setLastUpdatedBy(String lastUpdatedBy) {
        this.lastUpdatedBy = lastUpdatedBy;
    }

    /**
     * 获取lastUpdateDate
     *
     * @return lastUpdateDate
     */
    public Date getLastUpdateDate() {
        return this.lastUpdateDate;
    }

    /**
     * 设置lastUpdateDate
     *
     * @param lastUpdateDate
     */
    public void setLastUpdateDate(Date lastUpdateDate) {
        this.lastUpdateDate = lastUpdateDate;
    }

    /**
     * 获取删除标记 1是未删除 0是已删除
     *
     * @return 删除标记 1是未删除 0是已删除
     */
    public Integer getDeleteFlag() {
        return this.deleteFlag;
    }

    /**
     * 设置删除标记 1是未删除 0是已删除
     *
     * @param deleteFlag
     *          删除标记 1是未删除 0是已删除
     */
    public void setDeleteFlag(Integer deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    /* This code was generated by TableGo tools, mark 2 end. */
}